package com.s59.service;

import com.s59.entity.User;
import com.s59.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int add(User user){
        return userMapper.add(user);
    }

    public int del(Long id){
return userMapper.del(id);
    }


    public int update(User user){
        return userMapper.update(user);
    }

    public User get(Long id) {
        return userMapper.get(id);
    }

    public List<User> getall(){
        return userMapper.getall();
    }
}
